<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>教师编辑</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script type="text/javascript">
	function aaa(from){
		var name=from.name.value;
		var password=from.password.value;
		var username=from.username.value;
		if(name.length==0){
			alert("教师名称必填");
			return false;
		}
		if(password.length==0){
			alert("教师账号必填");
			return false;
		}
		if(username.length==0){
			alert("教师密码必填");
			return false;
		}
		return true;
	}
	function teacher(){
		window.location="teacher"
	}
</script>
</head>
<body>
<div class="ttt">
	<div class="form">
		<form action="teacher?method=save" method="post" onsubmit="return aaa(this)">
			<input type="hidden"  name="id" value="${model.id }">
			<p><label>教师名称:</label><input type="text" name="name" value="${model.name}"></p>
			<p><label>用户名:</label><input type="text" name="username" value="${model.username }"></p>
			<p><label>密码:</label><input type="text" name="password" value="${model.password}"></p>
			<p>
			<button type="submit" data-text="提交">提交</button>
	     	<button type="reset"  data-text="重置">重置</button>
			<button onclick="teacher()" >返回</button>
		</form>
	</div>
</div>
</body>
</html>